<?php
	header('Content-Type: text/xml');
	echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
	define('TSUE_SEC', TRUE);
	include_once( '../include/security.text.php' );
	include_once( '../database/cmysql.php' );
	include_once( '../../data/config.php');
	
	$sectext = new CSecurity();
	if(empty($_GET['id'])) $id = 0;
	$id = $sectext->digit( $_GET['id'] );
	$sql = new cMysql();
	$sql->connect($SQL_CONF['host'], $SQL_CONF['user'], $SQL_CONF['pass'], $SQL_CONF['dbname']);
	$rows = $sql->fetch_array("SELECT `message` FROM `". $SQL_CONF['pref'] ."ticketmessage` WHERE `ticketid`='". $id ."' LIMIT 0, 1");
	$sql->close();
	
	// Print XML
	echo '<response>';
	echo $rows[0]['message'];
	echo '</response>';
?>